# -*- coding: utf-8 -*-
# @Time      : 2025-08-01
# @Author    : 2023090007@ahdy.edu.cn
# @File      : bootstrap
# @Desc  
import os
from master import Master




def generate_console_script():
    pid = os.getpid();
    shell_content = f"""#!/bin/bash
DISPATCH_MASTER_PID={pid}
    """
    output_path = "./dispatch_pid.sh"
    with open(output_path, 'w') as f:
        f.write(shell_content)

def main():
    """
    1
    :return:
    """
    # ./bootstrap.py biz_sms -w 10 -c ./dev.ini 
    master = Master()
    generate_console_script() 
    master.start();
    


if __name__ == "__main__":
    """
    """
    main()
    input("按回车键继续...")
